package com.hrg.rds.infra.connect.protocol.s7;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(S7Properties.class)
@ConditionalOnProperty(prefix = "s7", name = "enabled", havingValue = "true")
public class S7Configuration {

	@Bean
	public S7ConnectionHolder s7ConnectionHolder(S7Properties s7Properties) {
		return new S7ConnectionHolder(s7Properties);
	}

}
